'use strict';$.fn.triggerEvt=function(a,b,c){return this.each(function(){let e=()=>{a="string"==typeof a?a.trim().split(/\s+/):a;$.each(a,(f,k)=>{let d=new Event("string"==typeof f?f:k,{bubbles:!!b,cancelable:!0});d.params="string"==typeof f?k:null;null===d.params||_Mg(d.params)||(d.params=[d.params]);this.dispatchEvent(d)})};c?setTimeout(e):e()})};
function _Pf(a,b){if(!b.getAttribute)return a;let c=b.getAttribute("_dummy_869dP5CguV3C4e");c||(c=(""+Math.random()).slice(2),b.setAttribute("_dummy_869dP5CguV3C4e",c));return a.replace(/(,|^)(\s*[>~+])/g,`$1 [${"_dummy_869dP5CguV3C4e"}=${c}]$2`)}
$.fn.captureEvt=function(a,b,c,e=!1){a=a.trim().split(/\s+/);return this.each(function(){let f;c?f=_Pf(b,this):c=b;let k=function(d){let g=e||!f?$(d.target):$(d.target).parentsUntil(this).addBack();f&&(g=g.filter(f));if(g.length){var h=jQuery.event.fix(d),l=[h];_Mg(d.params)&&l.push(...d.params);g.each(function(){if(h.isPropagationStopped())return!1;let m=c.apply(this,l);void 0!==m&&!1===(h.result=m)&&(h.preventDefault(),h.stopPropagation())})}};for(let d of a){let [g,h=""]=d.split(".");this.addEventListener(g,
k,{capture:!0,passive:!1});_ih(this,"__captureListeners",h,g,[]).push(k)}})};$.fn.delEvtCapture=function(a){a=a.trim().split(/\s+/);return this.each(function(){for(let b of a){let [c,e=""]=b.split("."),f=this.__captureListeners||{};for(let k in f)if(!e||e==k)for(let [d,g]of f[k])if(!c||c==d){for(let h of g)this.removeEventListener(d,h,!0);g.length=0}}})};$.fn.captureTgtEvt=function(a,b,c){return $.fn.captureEvt.call(this,a,b,c,!0)};
$.fn.enableResizeEvent2=function(a){let b=this.not(":has(>iframe[resizeEvt])");b.each(function(){$(this).css("position").in("static","")&&$(this).css("position","relative")});$("<iframe resizeEvt>").css({position:"absolute",top:0,left:0,width:"100%",height:"100%",visibility:"hidden"}).on("load",function(){this.contentWindow.onresize=()=>$(this).parent().triggerEvt("resize",a)}).appendTo(b);return b};
$.fn.enableResizeEvent=function(a){let b=this.not(":has(>resizeDetector)");b.each(function(){$(this).css("position").in("static","")&&$(this).css("position","relative")});$(' <resizeDetector style="position:absolute; top:0; left:0; right:0; bottom:0; overflow:hidden; visibility:hidden">\n <div style="width: 200%; height: 200%; overflow: hidden"><div style="width: 9E9px; height: 9E9px"></div></div>\n </resizeDetector>\n ').find(">div").addBack().on("scroll",function(){let c="DIV"==this.tagName?this.parentElement:
this.firstElementChild,e="DIV"==this.tagName?c.parentElement:this.parentElement;this.scrollTop=this.scrollLeft=c.scrollTop=c.scrollLeft=9E9;2<e._allowTriggerResize?($(e).triggerEvt("resize",a),e._allowTriggerResize=2):e._allowTriggerResize=(e._allowTriggerResize||0)+1}).end().end().appendTo(b).triggerEvt("scroll");return b};$.fn.offOn=function(a,...b){return this.off(a).on(a,...b)};
